✨ New sniff to verify that spaces are used for mid-line alignment #942
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This new sniff covers the second part of this rule. (The first part is already covered by the
Generic.WhiteSpace.DisallowSpaceIndent
sniff).The error which is thrown is auto-fixable.
The new sniff has been added to the
WordPress-Core
ruleset.Violations against this sniff in the WPCS codebase have been fixed.
Mostly involved
getGroups()
function example comments. Some of these have also been adjusted slightly to be in line with an earlier change (#812) in which these were missed and/or with the comment from the abstract parent class.N.B.: I consider this sniff a candidate for pulling upstream to
Generic
in due time.N.B.2: This sniff could probably do with some additional unit tests, but I couldn't think of any more, so ideas/code snippets welcome. (The run over the WPCS code base did not yield any incorrect fixes or false positives, so I'm not too worried)